/*
 * @Author: yushuang
 * @Date: 2024-12-17 17:54:54
 * @LastEditors: yushuang
 * @LastEditTime: 2024-12-17 18:04:08
 * @Description:
 */
import { useTitle } from '@vueuse/core';
import type { RouteLocationNormalizedLoaded, RouteRecordRaw } from 'vue-router';

export function useMetaTitle(route: RouteRecordRaw | RouteLocationNormalizedLoaded) {
  const { title } = route.meta ?? {};
  if (title) {
    useTitle(title);
  }
}
